package com.dianping.cat.configuration.server.entity;

import com.dianping.cat.configuration.server.BaseEntity;
import com.dianping.cat.configuration.server.IVisitor;
import java.util.LinkedHashMap;
import java.util.Map;

public class LongConfig
  extends BaseEntity<LongConfig> {
/*  10 */   private int m_defaultUrlThreshold = 1000;

/*  12 */   private int m_defaultSqlThreshold = 100;

/*  14 */   private Map<String, Domain> m_domains = new LinkedHashMap();

/*  16 */   private int m_defaultServiceThreshold = 50;






/*  23 */   public void accept(IVisitor visitor) { visitor.visitLongConfig(this); }


  public LongConfig addDomain(Domain domain) {
/*  27 */     this.m_domains.put(domain.getName(), domain);
/*  28 */     return this;
  }


  public boolean equals(Object obj) {
/*  33 */     if (obj instanceof LongConfig) {
/*  34 */       LongConfig _o = (LongConfig)obj;

      if (getDefaultUrlThreshold() != _o.getDefaultUrlThreshold()) {
/*  37 */         return false;
      }

/*  40 */       if (getDefaultSqlThreshold() != _o.getDefaultSqlThreshold()) {
/*  41 */         return false;
      }

/*  44 */       if (!equals(getDomains(), _o.getDomains())) {
/*  45 */         return false;
      }

/*  48 */       if (getDefaultServiceThreshold() != _o.getDefaultServiceThreshold()) {
/*  49 */         return false;
      }


/*  53 */       return true;
    }

/*  56 */     return false;
  }


/*  60 */   public Domain findDomain(String name) { return (Domain)this.m_domains.get(name); }



/*  64 */   public int getDefaultServiceThreshold() { return this.m_defaultServiceThreshold; }



/*  68 */   public int getDefaultSqlThreshold() { return this.m_defaultSqlThreshold; }



/*  72 */   public int getDefaultUrlThreshold() { return this.m_defaultUrlThreshold; }



/*  76 */   public Map<String, Domain> getDomains() { return this.m_domains; }

/*     */



  public void mergeAttributes(LongConfig other) {
/*  93 */     this.m_defaultUrlThreshold = other.getDefaultUrlThreshold();

/*  95 */     this.m_defaultSqlThreshold = other.getDefaultSqlThreshold();

/*  97 */     this.m_defaultServiceThreshold = other.getDefaultServiceThreshold();
  }


/* 101 */   public Domain removeDomain(String name) { return (Domain)this.m_domains.remove(name); }


  public LongConfig setDefaultServiceThreshold(int defaultServiceThreshold) {
/* 105 */     this.m_defaultServiceThreshold = defaultServiceThreshold;
/* 106 */     return this;
  }

  public LongConfig setDefaultSqlThreshold(int defaultSqlThreshold) {
/* 110 */     this.m_defaultSqlThreshold = defaultSqlThreshold;
/* 111 */     return this;
  }

  public LongConfig setDefaultUrlThreshold(int defaultUrlThreshold) {
/* 115 */     this.m_defaultUrlThreshold = defaultUrlThreshold;
/* 116 */     return this;
  }
}


/* Location:              /Users/hanfei/Documents/apache-tomcat-9.0.24/webapps/cat/WEB-INF/lib/cat-core-3.0.0.jar!/com/dianping/cat/configuration/server/entity/LongConfig.class
 * Java compiler version: 7 (51.0)
 * JD-Core Version:       1.0.7
 */